<template>
  <div class="child">
    <h2>我是Child组件</h2>
    <Grandson/>
  </div>
</template>

<script>
  import Grandson from './Grandson.vue'
  export default {
    name:'Child',
    components:{Grandson},
    beforeCreate() {
      console.log('Child-创建之前')
    }
  }
</script>

<style scoped>
  .child {
    margin-top: 10px;
    background-color: skyblue;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px;
  }
</style>